#include "stdafx.h"
#include "vDxImage.h"

namespace vview
{

IMPLEMENT_RUNTIMEINFO(CDxImage, CVObject)


bool CDxImage::Initialize( CDxDisplay* pDisplay, DWORD dwWidth, DWORD dwHeight, DxFormat format, bool Renderalbe )
{
	V_ASSERTA(pDisplay);

	m_pDisplay = pDisplay;
	m_Width = dwWidth;
	m_Height = dwHeight;
	m_Format = format;
	m_Renderable = Renderalbe;
	return true;
}

bool CDxImage::AssignFromFile( LPCWSTR szPath )
{
	CImageData imgData;
	if (!imgData.LoadFromFile(szPath))
		return false;
	return AssignFromData(imgData);
}
}